import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';

export class SetLeverageDto {
  @ApiProperty({ description: '合约标识', required: true })
  @IsNotEmpty()
  contract: string;

  @ApiProperty({ description: '逐仓的杠杆倍数，全仓是要设置为0', required: true })
  @IsNotEmpty()
  leverage: number;

  @ApiProperty()
  @ApiProperty({ description: '全仓的杠杆倍数', required: false })
  cross_leverage_limit: number;
}
